//
// Created by win10 on 2024/12/30.
//
#include <stdio.h>
#include <stdlib.h>

typedef int ElementType;
typedef struct LNode *PtrToLNode;
struct LNode {
    ElementType Data;
    PtrToLNode Next;
};
typedef PtrToLNode List;

List Read(); /* 细节在此不表 */

int Length( List L ){
  int n = 0;
  while( L != NULL ){
    L = L->Next;
    n++;
  }
  return n;
}

int main()
{
    List L = Read();
    printf("%d\n", Length(L));
    return 0;
}